//
//  UIWebView+LoadProgress.m
//  BP_NewClient
//
//  Created by letv on 15/6/25.
//  Copyright (c) 2015年 normal. All rights reserved.
//

#import "UIWebView+LoadProgress.h"
#import <objc/runtime.h>

static void *s_resourceCountKey = &s_resourceCountKey;

@implementation UIWebView (LoadProgress)
@dynamic resourceCount;


- (NSInteger)resourceCount
{
    NSNumber *resourceCountNumber = objc_getAssociatedObject(self, s_resourceCountKey);
    if (!resourceCountNumber) {
        return 0;
    }else{
        return [resourceCountNumber integerValue];
    }
}


- (void)setResourceCount:(NSInteger)resourceCount{
    objc_setAssociatedObject(self, s_resourceCountKey, [NSNumber numberWithInteger:resourceCount], OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}

@end
